package cn.desk.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * Application Lifecycle Listener implementation class LogLocationListener
 *
 */
public class LogLocationListener implements ServletContextListener {

    /**
     * Default constructor. 
     */
    public LogLocationListener() {
    }

	/**
     * @see ServletContextListener#contextInitialized(ServletContextEvent)
     */
    public void contextInitialized(ServletContextEvent sce) {
    	String appRoot=sce.getServletContext().getRealPath("/");
        System.setProperty("appRoot", appRoot);
    }

	/**
     * @see ServletContextListener#contextDestroyed(ServletContextEvent)
     */
    public void contextDestroyed(ServletContextEvent sce) {
    }
	
}
